/*
SteelNzb
Copyright (C) 2008  Wessel v. Staal

This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
*/

#ifndef NNTP_INCLUDED
#define NNTP_INCLUDED

int nntp_login(void* state, const char* username, const char* password);
void nntp_close(void* state);
void* nntp_connect(const char* ip, int port);
int nntp_selectGroup(void* state, const char* group);
int nntp_downloadArticleToFile(void* state, const char* msg_id, const char* filepath,void(*progressCallback)(void*, int downloadedSize));
void nntp_setUserData(void* state, void* userdata);

#define NNTP_ERROR 0
#define NNTP_OK 1
#define NNTP_TIMEOUT 2
#define NNTP_ERROR_LOGIN 3
#define NNTP_ERROR_FILE 4
#define NNTP_ERROR_ARTICLE 5
#define NNTP_ERROR_GROUP 6

#define NNTP_GROUP_OK 211
#define NNTP_BODY_FOLLOWS 222
#define NNTP_MORE_AUTH 381
#define NNTP_AUTH_OK 281
#define NNTP_AUTH_OK2 250

#define NNTP_SERVER_READY_POST 200
#define NNTP_SERVER_READY_NOPOST 201

#endif






